<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@ page import="com.control.RateControl" %>
<%@ page import="com.model.Rate" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Insert title here</title>
</head>
<body>
<%
	request.setCharacterEncoding("utf-8");
	int admin_id=(Integer)session.getAttribute("user_id");
	String score=request.getParameter("score");
	String des=request.getParameter("describe");
	int id = Integer.parseInt(request.getParameter("id"));
	Rate rate=new Rate();
	RateControl rc=new RateControl();
	rate.setAdmin_id(admin_id);
	rate.setRate_score(score);
	rate.setRate_des(des);
	rate.setRate_id(id);
	if(rc.updateRate(rate))
	{
		%>
		<script>
		alert("修改成功！");
		window.location.href="Give_score_show.jsp";
		</script>
	<%}else{%>
		<script>
		alert("修改失败！");
		window.location.href="Give_score_show.jsp";
		</script>	
	<%}
%>

</body>
</html>